<template>
    <div class="container account-page">
        <div class="row">
            <div id="content" class="col-sm-12">
                <div class="row widget avatar-container">
                    <div class="col-sm-12 acconut-bg">
                        <div class="personal-content">
                            <img class="personal-image" src="http://thirdqq.qlogo.cn/qqapp/101225978/215D7B5C2A2FF8150D1B212B941ADF0D/100">
                            <div class="personal-account">
                                <span>小丑</span>
                                <span>无邮箱地址</span>
                            </div>
                        </div>
                        <div class="eidt-account"><a href="https://mall.opencart.cn/index.php?route=account/edit"><i class="iconfont"></i></a></div>
                        <div class="account-bg-bg"><img src="https://mall.opencart.cn/catalog/view/theme/mobile/image/account-bg-bg.png" class="img-responsive"></div>
                    </div>
                </div>
                <div class="row all-order-box">
                    <a class="bottom-border" href="#/account/order_list">
                        <span>所有订单</span><span>所有订单</span>
                    </a>
                </div>
                <div class="row widget">
                    <div class="col-sm-12">
                        <div class="order-button-groups">
                            <div class="order-button"><a href="#/account/order_list"><i class="iconfont"></i><span>所有订单</span></a></div>
                            <div class="order-button"><a href="#/account/order_list/pending"><i class="iconfont"></i><span>待付款</span></a></div>
                            <div class="order-button"><a href="#/account/order_list/processing"><i class="iconfont"></i><span>待发货</span></a></div>
                            <div class="order-button"><a href="#/account/order_list/pending"><i class="iconfont"></i><span>待收货</span></a></div>
                        </div>
                    </div>
                </div>
                <div class="row widget">
                    <div class="col-sm-12">
                        <ul class="accordion-list list-unstyled">
                            <li><a href="https://mall.opencart.cn/index.php?route=account/edit"><i class="iconfont icon-zhanghuxinxi"></i> 编辑账号</a></li>
                            <li><a href="https://mall.opencart.cn/index.php?route=account/password"><i class="iconfont icon-iconfontmima"></i> 修改密码</a></li>
                            <li><a href="https://mall.opencart.cn/index.php?route=account/address"><i class="iconfont icon-iconfontchanpincanshu"></i> 地址管理</a></li>
                            <li><a href="https://mall.opencart.cn/index.php?route=account/wishlist"><i class="iconfont icon-iconfontyouhuiquan"></i> 收藏商品</a></li>
                        </ul>
                    </div>
                </div>
                <div class="row widget">
                    <div class="col-sm-12">
                        <ul class="accordion-list list-unstyled">
                            <li><a href="https://mall.opencart.cn/index.php?route=account/order"><i class="iconfont icon-iconfontquanbudingdan"></i> 订单历史</a></li>
                            <li><a href="https://mall.opencart.cn/index.php?route=account/download"><i class="iconfont icon-iconxiazai"></i> 下载</a></li>
                            <li><a href="https://mall.opencart.cn/index.php?route=account/coupons"><i class="iconfont icon-iconxiazai"></i> 优惠券</a></li>
                            <li><a href="https://mall.opencart.cn/index.php?route=account/reward"><i class="iconfont icon-iconfontwodehuiyuanqia"></i> 我的积分</a></li>
                            <li><a href="https://mall.opencart.cn/index.php?route=account/return"><i class="iconfont icon-tuihuo"></i> 商品退换</a></li>
                            <li><a href="https://mall.opencart.cn/index.php?route=account/transaction"><i class="iconfont icon-custom-take-notes"></i> 我的余额</a></li>
                            <li><a href="https://mall.opencart.cn/index.php?route=account/oreview"><i class="iconfont icon-zhanghuxinxi"></i> 商品评论</a></li>
                            <li><a href="https://mall.opencart.cn/index.php?route=account/withdraw_list"><i class="iconfont icon-custom-take-notes"></i> 余额提现</a></li>
                        </ul>
                    </div>
                </div>
                <div class="row widget">
                    <div class="col-sm-12">
                        <ul class="accordion-list list-unstyled">
                            <li><a href="https://mall.opencart.cn/index.php?route=account/newsletter"><i class="iconfont icon-iconfontyoujian"></i> 邮件订阅</a></li>
                            <li><a href="https://mall.opencart.cn/index.php?route=account/logout"><i class="iconfont icon-iconfont31wode"></i> 退出登录</a></li>
                        </ul>
                    </div>
                </div>

            </div>
        </div>

        <bottom-nav></bottom-nav>
    </div>

</template>

<script>
    import nav from '../components/common/nav';
    export default {
        name: "account",

        data:function(){

            return {

            }
        },

        methods:{

            check_login:function(){
                var t = this;
                var url = this.config.web_url + '/?r=member/login/status';

                this.axios.get( url ).then(function( res ){
                    if( res.data.status ){
                        //todo 跳转页面
                        t.$router.push('/login');
                    }

                });
            },
        },

        created:function(){

            this.check_login();

        },
        components:{
            'bottom-nav':nav
        }
    }
</script>

<style scoped>

</style>